Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODStorageUnit


Focus

The Focus method focuses this storage unit on the specified focus context.

ODStorageUnit Focus (in ODPropertyName propertyName, 
                     in ODPositionCode propertyPosCode, 
                     in ODValueType valueType, 
                     in ODValueIndex valueIndex, 
                     in ODPositionCode valuePosCode);
propertyName
The name of the property in the desired focus context, or kODNULL to ignore this parameter.
propertyPosCode
The position code, relative to the current focus context, of the property in the desired focus context, or kODPosUndefined to ignore this parameter.
valueType
The value type of the value in the desired focus context, or kODNULL to ignore this parameter.
valueIndex
The value index of the value in the desired focus context, or 0 to ignore this parameter.
valuePosCode
The position code, relative to the current focus context, of the value in the desired focus context, or kODPosUndefined to ignore this parameter.
return value
A reference to this storage unit, focused on the specified focus context.
DISCUSSION
Your part calls this method; its parameters specify the desired focus context.

After this method executes successfully, this storage unit's offset is 0.

Before calling this method, you can call the Exists method to check whether the specified focus context exists.

EXCEPTIONS
kODErrIllegalPropertyName
The specified property name is improperly formed or illegal.
kODErrPropertyDoesNotExist
This storage unit does not contain the specified property.
kODErrSUValueDoesNotExist
This storage unit does not contain the specified value.
kODErrUnsupportedPosCode
One of the specified position codes is not supported.
kODErrValueIndexOutOfRange
The specified property has no value at the specified index.
kODErrZeroRefCount
This storage unit has a reference count of 0.
SEE ALSO
The ODPositionCode type (page 915).
The ODPropertyName type (page 904).
The ODValueIndex type (page 904).
The ODValueType type (page 904).
The ODStorageUnit::Exists method (page 681).
The ODStorageUnit::FocusWithCursor method (page 686).
Listing 2-41 on page 100 in OpenDoc Cookbook.
Listing 2-45 on page 106 in OpenDoc Cookbook.
Listing 2-46 on page 108 in OpenDoc Cookbook.
"Focusing a Storage Unit" on page 274 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help